package com.tencent.service;

import com.tencent.common.Configure;
import com.tencent.protocol.pay_protocol.OAuthReqData;

public class GetOpenidService extends BaseService{

    public GetOpenidService() throws IllegalAccessException, InstantiationException, ClassNotFoundException {
        super(Configure.OAUTH_API);
    }
    
    /**
     * 请求openid服务
     * @param oAuthReqData 这个数据对象里面包含了API要求提交的各种数据字段
     * @return API返回的数据
     * @throws Exception
     */
    public String request(OAuthReqData oAuthReqData) throws Exception {

        //--------------------------------------------------------------------
        //发送HTTPS的Post请求到API地址
        //--------------------------------------------------------------------
        String responseString = sendPost(oAuthReqData);

        return responseString;
    }
}
